package com.spboot.exts.entity;

import org.apache.solr.client.solrj.beans.Field;
import org.springframework.data.solr.core.mapping.SolrDocument;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;

/**
 * solr 对应实体类
 * 
 * @author Administrator
 *
 */
@Data
@TableName("smbms_news")
@SolrDocument(collection = "easybuy_core")//指定solr对应的core
public class News {

    @TableId(value = "id", type = IdType.AUTO)
    @Field //solr字段
	private Integer id;
    @Field(value = "title") //字段不一致对应
	private String title;
    @Field
	private String content;

    @Field
    @TableField("createTime")
	private String createTime;
	@Override
	public String toString() {
		return "News [id=" + id + ", title=" + title + ", content=" + content + "]";
	}
	
	
}
